#!/bin/bash



case "$1" in

 "start") 

 python /var/www/vhosts/live_engine/manage.py runfcgi method=prefork host=localhost port=8001 pidfile=/tmp/server.pid 

 ;;

 "stop") 

 kill -9 `cat /tmp/server.pid` 

 ;;

 "restart")

 $0 stop

 sleep 1

 $0 start

 ;;

 *) echo "Usage: ./server.sh {start|stop|restart}";;

esac
